package com.ruoyi.baseData.controller;

import com.ruoyi.baseData.domain.dto.ProceduresTeamDto;
import com.ruoyi.baseData.service.ProceduresTeamService;
import com.ruoyi.common.core.domain.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/proceduresTeam")
public class ProceduresTeamController {

    @Autowired
    ProceduresTeamService proceduresTeamService;

    @PostMapping("/getProceduresTeamByPage")
    public R export(@RequestBody ProceduresTeamDto materialDto)
    {
        return R.ok(proceduresTeamService.getProceduresTeamByPage(materialDto));
    }


    @PostMapping("/addProceduresTeams")
    public R export(@RequestBody List<ProceduresTeamDto> materialDto)
    {
        proceduresTeamService.addProceduresTeams(materialDto);
        return R.ok("添加成功");
    }


    @PostMapping("/addProceduresTeam")
    public R addProceduresTeam(@RequestBody ProceduresTeamDto materialDto)
    {
        proceduresTeamService.addProceduresTeam(materialDto);
        return R.ok("添加成功");
    }
}
